<?php
include_once dirname(__FILE__) . '/../system/settings.php';
if($_POST){
    $email = $_POST['usuario'];
    $password = md5($_POST['senha']);
    if($data = UsuariosControl::Logar($email,$password)){
        $_SESSION['user'] = $data[0]['name'];
        echo 1;
        header("location:/admin/");
    }else{
        echo 0;
    }
}

?>
